package com.atguigu.acyjl;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.atguigu.acyjl.activity.MainActivity;

public class Catalog extends AppCompatActivity {
    Button btn01,btn02,btn03;
    public boolean w1f=false;
    public boolean w2f=false;
    public boolean w3f=false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_catalog);

        btn01 = findViewById(R.id.btn01);
        btn02 = findViewById(R.id.btn02);
        btn03 = findViewById(R.id.btn03);

        Click();


    }
    public void Click(){
        btn01.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                w1f=true;
                Intent i = new Intent(Catalog.this, MainActivity.class);
                Settings.levelSetting=1;
                startActivity(i);
            }
        });
        btn02.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                w2f=true;
                Intent i = new Intent(Catalog.this,MainActivity.class);
                Settings.levelSetting=4;
                startActivity(i);
            }
        });
        btn03.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                w3f=true;
                Intent i = new Intent(Catalog.this,MainActivity.class);
                Settings.levelSetting=4;
                startActivity(i);
            }
        });
    }

}
